<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户页面</title>
    <!--1.引入bootstrap样式框架；-->
    <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">

    <!--2.引入angularJS分页样式的框架；-->
    <link rel="stylesheet" href="../angularjs/pagination.css">

    <link rel="stylesheet" href="../layer/theme/default/layer.css">

    <!--3.引入bootstrap中的Jquery框架；-->
    <script src="../bootstrap/js/jquery.min.js"></script>
    <!--4.引入bootstrap中的Js框架；-->
    <script src="../bootstrap/js/bootstrap.min.js"></script>

    <script src="//cdn.bootcss.com/angular.js/1.5.8/angular.min.js"></script>
    <script src="//cdn.bootcss.com/angular.js/1.5.8/angular-route.js"></script>

    <!--<script src="//unpkg.com/angular-ui-router@0.4.2/release/angular-ui-router.js"></script>-->
    <!--6.引入AngularJS分布的JS框架-->
    <script src="../angularjs/pagination.js"></script>

    <script src="../layer/layer.js"></script>

    <script>
        var app = angular.module('userApp', []);
        app.controller('userController', function ($scope, $http) {
            //var ukPhone = window.sessionStorage.getItem("ukPhone");

            //zuul
            $http.post('http://localhost:12000/tran/ip').then(function (data) {  //正确请求成功时处理
                console.log(data)
                if (data.data.code == 403) {
                    window.location.href = "/login.html";
                }
            }).catch(function (result) { //捕捉错误处理
                console.info(result);
            });
            $scope.news = function () {

                $http.get("http://127.0.0.1:12000/user/user/queryById?ukPhone="+window.sessionStorage.getItem("ukPhone")).success(function (data) {
                    console.log(data);
                    $scope.user = data;
                })
            }
        })

    </script>
</head>
<body ng-app="userApp" ng-init="news()" ng-controller="userController">
<div>
    <ol class="breadcrumb" style="margin-top: 0px;margin-bottom: 0;">
        <li><a >Home</a></li>
        <li><a >银行</a></li>
        <li><a href="/index.html">返回首页</a></li>
    </ol>
</div>
<div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h1>用户页面</h1>
        </div>
        <div class="panel-body">

            <table class="table table-bordered table-hover table-striped table-condensed text-center">
                <tr>
                    <td>用户名(中文)</td>
                </tr>
                <tr>
                    <td>{{user.userName}}</td>
                </tr>
                <tr>
                    <td>用户名(拼音)</td>
                </tr>
                <tr>
                    <td>{{user.userNameSoundmark}}</td>
                </tr>
                <tr>
                    <td>电话号码</td>
                </tr>
                <tr>
                    <td>{{user.ukPhone}}</td>
                </tr>
                <tr>
                    <td>生日</td>
                </tr>
                <tr>
                    <td>{{user.birthday}}</td>
                </tr>
                <tr>
                    <td>性别</td>
                </tr>
                <tr>
                    <td ng-if="user.sex == 1">
                        女
                    </td>
                    <td ng-if="user.sex == 0">
                        男
                    </td>
                </tr>
                <tr>
                    <td>操作</td>
                </tr>
                <tr>
                    <td>
                        <a class="btn btn-primary" type="button" href="bankinfo.html">我的银行卡</a>
                        <a class="btn btn-primary" type="button" href="../transfer.html">转账</a>
                    </td>
                </tr>
            </table>
        </div>
        <div class="panel-footer text-right">
            用户页面
        </div>
    </div>
</div>
</body>
</html>